package advancewars.core.unit;

/**
 * A suppliable unit can supply other unit with fuel.
 * @author Coddy
 * 2009-11-14
 */
public interface ISuppliable
{
	/**
	 * Get supplies capacity of this suppliable unit.
	 * @return
	 */
	int getSuppliesCapacity();
	
	/**
	 * Get remaining supplies amount of this suppliable unit.
	 * @return
	 */
	int getSuppliesAmount();
	
	/**
	 * Supply a unit's fuel tank as full as possible. 
	 * If the supplies amount of the supplier is less than the amount of unit to supply, it will just give all supplies away. 
	 * @param unit the unit to supply.
	 */
	void supply(IUnit unit);
	
	/**
	 * Supply a unit's fuel tank with specified amount.
	 * @param unit
	 * @param amount
	 */
	void supply(IUnit unit, int amount);
}
